

if [ -n "$1" ] ; then
  data_date=$1
else
  data_date=`date -d "-1 days" +%F`
fi

ODS_BASE_LOG_SQL="
LOAD DATA INPATH '/warehouse/applet/log' INTO TABLE gmall_ods.ods_base_log PARTITION (dt = '${data_date}');
"
/opt/module/spark/bin/beeline -u jdbc:hive2://node101:10001 -n bwie -e "${ODS_BASE_LOG_SQL}"
